package com.kingmed.kmss.bpmn.modules.backup.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kingmed.kmss.bpmn.modules.backup.model.BizApprovalStatus;
import com.kingmed.kmss.common.vo.CommonPage;

import java.util.List;

/**
 * <p>
 * 审批状态表 服务类
 * </p>
 *
 * @author wzg
 * @since 2023-02-25
 */
public interface BizApprovalStatusService extends IService<BizApprovalStatus> {

	void saveApprovalStatus(BizApprovalStatus status);

	void updateNextAssignees(String bizType, String bizId, List<String> groupUsers, String procInstId);

	void saveProcessCompleteStatus(String bizType, String bizId, Boolean approved, String procInstId);

	CommonPage<BizApprovalStatus> getBizApprovalStatus(String bizType, String approvedByUserId, String currApprover, String auditStatus, int pageSize, int pageNum);

	void setApprovedBy(String bizType, String bizId, List<String> groupUsers, String procInstId);

	Page<BizApprovalStatus> getBizApprovalStatusByBizIds(String bizType, List<String> procInstIds, String currApprover, String auditStatus, String userId,
														 int pageSize, int pageNum,String startTime, String endTime,String requestByName);

	BizApprovalStatus getApprovalStatusByTypeAndId(String businessType, String businessId, String procInstId);


	BizApprovalStatus getByProcessInstanceId(String processInstanceId);

	/**
	 * 列出提交流程条数
	 */
	List<BizApprovalStatus> listByBusinessId(String businessId, String businessType);
}
